<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
    <title>CSS Free Templates with jQuery Slider</title>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
    <link rel="shortcut icon" href="<?php echo base_url() . "template/home/" ?>css/images/favicon.ico"/>
    <link rel="stylesheet" href="<?php echo base_url() . "template/home/" ?>css/style.css" type="text/css" media="all"/>
    <!--[if IE 6]>
    <![endif]-->
    <link rel="stylesheet" href="<?php echo base_url() . "template/home/" ?>css/jquery.jscrollpane.css" type="text/css"
          media="all"/>
    <script src="<?php echo base_url() . "template/home/" ?>js/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="<?php echo base_url() . "template/home/" ?>js/jquery-1.10.2.js" type="text/javascript"></script>
    <script src="<?php echo base_url() . "template/home/" ?>js/DD_belatedPNG-min.js" type="text/javascript"></script>
    <script src="<?php echo base_url() . "template/home/" ?>js/jquery.jscrollpane.min.js"
            type="text/javascript"></script>
    <script src="<?php echo base_url() . "template/home/" ?>js/jquery.jcarousel.js" type="text/javascript"></script>
    <script src="<?php echo base_url() . "template/home/" ?>js/functions.js" type="text/javascript"></script>

</head>
<body>
<!-- Wrapper -->
<div id="wrapper">
    <div id="wrapper-bottom">
        <div class="shell">
            <!-- Header -->
            <div id="header">
                <!-- Logo -->
                <h1 id="logo"><a title="Home" href="#">accessories store</a></h1>

                <p class="shopping-cart"><a class="cart" href="#" title="Your Shopping Cart">Your Shopping
                        Cart</a><span>Articles:</span>&nbsp;4<span>Cost:</span>&nbsp;$59.99</p>
                <!-- Search -->
                <div class="search-expand"></div>
                <div id="search">
                    <div class="retract-button">
                        <p>retract</p>
                    </div>
                    <form action="" method="post">
                        <input type="text" class="field" value="Search" title="Search"/>
                        <input type="submit" value="" class="submit-button"/>
                    </form>
                </div>
                <!-- END Search -->
                <div class="cl"></div>
                <!-- Navigation -->
                <div id="navigation">
                    <ul>
                        <li><a title="Home" href="#">Home</a></li>
                        <li><a title="Sales" href="#">Sales</a></li>
                        <li><a title="Catalog" href="#">Catalog</a></li>
                        <li><a title="Blog" href="#">Blog</a></li>
                        <li><a title="About Us" href="#">About Us</a></li>
                    </ul>
                </div>
                <div class="cl"></div>
                <!-- END Navigation -->
                <!-- Dropdown Navigation -->
                <div id="sort-nav">
                    <span class="label-left"></span>

                    <div class="label-bg">
                        <ul>
                            <li>
                                <a title="Collections" href="#">Danh mục</a>

                                <div class="dd">
                                    <ul>
                                        <?php foreach ($cate_parent as $value) { ?>
                                            <li><a title="Product"
                                                   href="<?php echo base_url() . 'home/' . $value["cate_name"]; ?>"><?php echo $value['cate_name']; ?></a>

                                                <div class="cc">
                                                    <?php $count = 0; ?>
                                                    <?php foreach ($cate_child as $data) {
                                                        if ($data['cate_parent'] == $value['cate_id']) {
                                                            $count++;
                                                        }
                                                    }?>
                                                    <?php if ($count > 0) { ?>
                                                        <ul>
                                                            <?php foreach ($cate_child as $data) { ?>
                                                                <?php if ($data['cate_parent'] == $value['cate_id']) { ?>
                                                                    <li>
                                                                        <a href="#"><?php echo $data['cate_name']; ?></a>
                                                                    </li>
                                                                <?php }
                                                            } ?>
                                                        </ul>
                                                    <?php } ?>
                                                </div>
                                            </li>
                                        <?php } ?>
                                    </ul>
                                </div>
                            </li>
                            <li>
                                <a title="Brand" href="#">Brands</a>

                                <div class="dd">
                                    <ul>
                                        <li><a title="Product" href="#">Product</a></li>
                                        <li><a title="Product" href="#">Product</a></li>
                                        <li><a title="Product" href="#">Product</a></li>
                                        <li><a title="Product" href="#">Product</a></li>
                                    </ul>
                                </div>
                            </li>
                            <li class="last">
                                <a title="By Price" class="By Price" href="#">By Price</a>

                                <div class="dd">
                                    <ul>
                                        <li><a title="Product" href="#">Product</a></li>
                                        <li><a title="Product" href="#">Product</a></li>
                                    </ul>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <span class="label-right"></span>
                </div>
                <!-- END Dropdown Navigation -->
                <div class="cl"></div>
            </div>
            <!-- END Header -->
            <!-- Main -->
            <div id="main">
                <!-- Slider -->
                <div class="slider-holder">
                    <div class="promo">
                        <img src="<?php echo base_url()."template/home"?>/css/images/promo.jpg" alt="Big Sale This Week -30% OFF!" />
                    </div>
                    <div id="slider">
                        <ul>
                            <li>
                                <img src="<?php echo base_url()."template/home"?>/css/images/slide1.jpg" alt="colour pencils" title="" />
                                <div class="caption">
                                    <h2>Some Tittle Goes Here</h2>
                                    <div class="text"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tempus malesuada lobortis. Sed id lobortis est.</p></div>
                                    <div class="buy-now">
                                        <p>BUY NOW</p>
                                        <p class="price">$<span>0.99</span></p>
                                    </div>
                                    <div class="cl"></div>
                                    <p><strike>$1.29</strike></p>
                                </div>
                            </li>
                            <li>
                                <img src="<?php echo base_url()."template/home"?>/css/images/slide2.jpg" alt="pencils"  title=""/>
                                <div class="caption">
                                    <h2>Some  Goes Here</h2>
                                    <div class="text">
                                        <p>Lorem  dolor sit amet, consectetur adipiscing elit. Ut tempus malesuada lobortis. Sed id lobortis est.</p></div>
                                    <div class="buy-now">
                                        <p>BUY NOW</p>
                                        <p class="price">$<span>0.99</span></p>
                                    </div>
                                    <div class="cl"></div>
                                    <p><strike>$1.29</strike></p>
                                </div>
                            </li>
                            <li>
                                <img src="css/images/slide1.jpg" alt="pencils" />
                                <div class="caption">
                                    <h2>Some Tittle Goes Here</h2>
                                    <div class="text">
                                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tempus malesuada lobortis. Sed id lobortis est.</p>
                                    </div>
                                    <div class="buy-now">
                                        <p>BUY NOW</p>
                                        <p class="price">$<span>0.99</span></p>
                                    </div>
                                    <div class="cl"></div>
                                    <p><strike>$1.29</strike></p>
                                </div>
                            </li>
                            <li>
                                <img src="<?php echo base_url()."template/home"?>/css/images/slide2.jpg" alt="pencils" />
                                <div class="caption">
                                    <h2>Some  Goes Here</h2>
                                    <div class="text">
                                        <p>Lorem ipsum dolo adipiscing elit. Ut tempus malesuada lobortis. Sed id lobortis est.</p>
                                    </div>
                                    <div class="buy-now">
                                        <p>BUY NOW</p>
                                        <p class="price">$<span>0.99</span></p>
                                    </div>
                                    <div class="cl"></div>
                                    <p><strike>$1.29</strike></p>
                                </div>
                            </li>
                            <li>
                                <img src="<?php echo base_url()."template/home"?>/css/images/slide1.jpg" alt="pencils" />
                                <div class="caption">
                                    <h2>Some Tittle Goes Here</h2>
                                    <div class="text">
                                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tempus malesuada lobortis. Sed id lobortis est.</p>
                                    </div>
                                    <div class="buy-now">
                                        <p>BUY NOW</p>
                                        <p class="price">$<span>0.99</span></p>
                                    </div>
                                    <div class="cl"></div>
                                    <p><strike>$1.29</strike></p>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="cl"></div>
                    <div class="jcarousel-control">
                        <a title="Slide 1" href="#">1</a>
                        <a title="Slide 2" href="#">2</a>
                        <a title="Slide 3" href="#">3</a>
                        <a title="Slide 4" href="#">4</a>
                        <a title="Slide 5" href="#">5</a>
                    </div>
                </div>
                <!-- END Slider -->
                <!-- Content -->
                <div class="clear"></div>
                <div id="content" style="width: 982px; height: 1000px;">
                    <div class="detail-total" style="width: 982px; float: left;">
                    <div class="link-title">abc</div>
                <div class="image-detail" style="border: solid 1px #dae2db; float: left; width: 300px;">
                    <?php $image = explode(',',$info['product_image']);?>
                    <?php $count =  count($image); ?>
                    <?php for($i=0; $i<$count;$i++){ ?>

                        <img class="zoom-image" height="100px" width="100px" src="<?php echo base_url().'images/'.$image[$i]?>">

                    <?php } ?>
                </div>
                    <div class="info-detail" style="float: left; width: 400px; margin-left: 10px;">

                            <div><p class="product_name" style='font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight:bold; font-size: 24px;'><?php echo $info['product_name']; ?></p></div>
                            <hr style="margin: 5px 0px;">
                            <div style="border: solid 1px #d1e2d9; font-size: 14px;"><?php echo str_replace("-","<br/> -",$info['product_description']); ?></div>
                            <div style="border: solid 1px #d1e2d9; margin-top: 5px; font-size: 15px; ">
                                <div><span style=" font-weight: bold;">Giá:</span><strike><?php echo number_format($info['product_price']); ?></strike></div>
                                <div><span style="color: red; font-weight: bold;">Giá khuyến mại:</span><?php echo number_format($info['product_price']- ($info['product_price']*$info['product_sale'])/100); ?></div>
                            </div>

                    </div>
                    </div>
                    <div style="clear: both;"></div>
                        <div id="review" class="review" style="border: solid 1px #d1e2d9; width: 710px; margin-top: 10px; ">
                            <form action="<?php echo base_url().'home/detail/comment'?>" method="post">
                            <p id="errors"></p>
                            <table>
                                <tr>
                                    <td width="90" align="right">Tên:</td>
                                    <td class="review-name"><input type="text" name="name" id="review_name" size="20"></td>

                                    <td width="90" align="right">Email:</td>
                                    <td class="review-email"><input type="text" name="email" id="review_email" size="20"></td></tr>
                                <tr>
                                    <td align="right">Tiêu đề:</td>
                                    <td class="review-title1"><input type="text" name="title" id="review_title" size="20"></td>
                                    <td>&nbsp</td>
                                    <td>&nbsp</td>
                                </tr>

                            </table>
                                <p style="margin-left: 45px;">Nội dung</p>
                            <div class="review-description"><textarea id="review_description" style="background-color: #ffffff; margin-left: 45px;" name="description" cols="75" rows="6"></textarea></div>
                            <br/>
                            <div><input type="submit" value="submit" id="submit"/>
                                <a class="button_comment" id="button_comment" style="text-decoration: none; ">Bình luận</a></div>
                            <br/>
                            </form>
                        </div>


                    <div class="show-comment" style="width: 712px; border: solid 1px #d1e2d9; margin-top: 10px;">
                        <?php $this->load->view("list_comment"); ?>
                    </div>
                <script type="text/javascript">
                    $('#button_comment').click(function () {
                        errors = $("#errors");
                        name = $("#review_name").val();
                        email = $("#review_email").val();
                        title = $("#review_title").val();
                        description = $("#review_description").val();
                        product_id = 10;//alert("true"); return false;
                        if (name == "" || description == "" || email == "" || title == "") {
                            errors.html("Please enter full information");
                        } else {
                            $.ajax({
                                "url": "<?php echo base_url(); ?>home/detail/comment",
                                "type": "post",
                                "data": "name="+name+"&email=" + email + "&title=" + title + "&description=" + description + "&product_id=" + product_id,
                                "async": false,
                                success: function (result) {
                                    //alert(result);
                                    // if (result == true) {
                                    location.reload();
                                    //}
                                }
                            });
                        }
                    });

                </script>



                </div>
                <!-- END Content -->
            </div>
            <!-- END Main -->
        </div>
    </div>
    <div id="footer-push"></div>
</div>
<!-- END Wrapper -->
<!-- Footer -->
<div id="footer">
    <div class="shell">
        <a class="footer-logo" href="http://css-free-templates.com/" title="Home"><img
                src="<?php echo base_url() . "template/home" ?>/css/images/logo-footer.png" alt="Logo"/></a>

        <p id="bottom-nav"><a title="Home" href="#">Home</a><a title="Sales" href="#">Sales</a><a title="Catalog"
                                                                                                  href="#">Catalog</a><a
                title="Blog" href="#">Blog</a><a title="About Us" href="#">About Us</a><a
                title="Design by: CSS Free Templates" href="http://css-free-templates.com/">Design by: CSS Free
                Templates</a></p>

        <div class="cl"></div>
    </div>
</div>
<!-- END Footer -->
</body>
</html>